import React from 'react';
import ReactDOM from 'react-dom';
//import VirtualList from 'react-tiny-virtual-list';
import VirtualList from './VirtualList';
let data = new Array(30).fill(0);
ReactDOM.render(
  <VirtualList
    width="50%"
    height={500}
    itemCount={data.length}
    itemSize={50}
    renderItem={
      (data)=>{
        console.log(data);
        let {index,style} = data;
        return (
          <div key={index} style={{...style,backgroundColor:index%2==0?'green':'orange'}}>
            {index+1}
          </div>
        )
      }
    }
  />
    ,document.getElementById('root'));